<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<title>提交事件</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<link href="<?php echo base_url()?>media/css/style.css" type="text/css" rel="stylesheet"/>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/jquery/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/jquery/jquery.validate.min.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/swfupload/swfupload.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/swfupload/swfupload.queue.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/swfupload/fileprogress.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/swfupload/handlers.js"></script>
	<script type="text/javascript" src="<?php echo base_url()?>media/js/check/CheckCustomerForm.js"></script>
</head>
<body>
	<form action="<?=base_url()?>incident/AddEventByCustomer/eventId/<?=$eventId?>" method="post" id="NewRequestByCustomer">
		<div class="form_div"  id="NewRequestFormDiv">
			<h5>新建服务请求</h5>
			<div class="form_block black_border">
				<div class="input_item margin_r_160">
					<label>事件号</label>
					<input type="text" name="event_id" value="SJ<?php printf("%08d", $eventId);?>" style="width:120px;" readonly/>
				</div>
				<div class="select_item">
					<label>请求类型</label>
					<select name="event_type">
						<?php foreach($event_type_list as $row):?>
                        <option value="<?php echo $row['option_id'];?>"><?php echo $row['option_name'];?></option>
                        <?php endforeach;?>
					</select>
				</div>
				<div class="select_item margin_r_160">
					<label>紧急程度</label>
					<select name="event_emergency">
                    	<?php foreach($event_emergency_list  as $code=>$name):?>
                        <option value="<?php echo $code;?>"><?php echo $name;?></option>
                        <?php endforeach;?>
						<!--<option value=1>高</option>-->
					</select>
				</div>
				<div class="select_item">
					<label>影响范围</label>
					<select name="event_influencearea">
						<?php foreach($event_influencearea_list as $row):?>
                        <option value="<?php echo $row['option_id'];?>"><?php echo $row['option_name'];?></option>
                        <?php endforeach;?>
                        <!--<option value=1>影响个别用户</option>-->
					</select>
				</div>
				<div class="select_item margin_r_160">
					<label>类别</label>
					<select name="event_category" id="event_category">
                    	<?php foreach($event_cat_list as $row):?>
                        <option value="<?php echo $row['option_id'];?>"><?php echo $row['option_name'];?></option>
                        <?php endforeach;?>
						<!--<option value=1>使用问题</option>-->
					</select>
				</div>
				<div class="select_item">
					<label>子类</label>
					<select name="event_subclass" id="event_subclass">
						<?php foreach($event_subclass as $row): ?>
						<option value="<?=$row['option_id']?>"><?=$row['option_name']?></option>
						<?php endforeach; ?>
					</select>
				</div>
			<div class="clear_both"></div>
			</div>
			<div class="form_block no_top_bborder">
				<div class="input_item input_item_width500" >
					<label>主题</label>
					<span><input type="text" name= "event_title" /></span><span class="redfont">(*)</span>
				</div>
				<div class="textarea_item" >
					<label>描述</label>
					<textarea name="event_desc"></textarea><span class="redfont">(*)</span>
				</div>
				<div id="uploaded_file_info"  class="uploaded_file_info" style="padding-left:80px;clear:both;">
					<div id="fsUploadProgress"></div>
				</div>
				<div class="clear_both"></div>
				<div class="upload_item">
					<label>附件</label>
					<span id="upload_btn"></span><input id="btnCancel" type="button" value="cancel" style="display:none;" />
				</div>
				<div class="clear_both"></div>

				<div class="clear_both"></div>
			</div>
			<div class="form_block black_border margin_t_b_5" style="text-align:center;">
				<input type="submit" style="margin-right:30px" class="sub_btn" value="提交" />
				<input type="reset" class="btn_60_24" value="重置" />
			</div>
		</div>
	</form>
</body>
</html>
<script>
var swfu;
var settings = {
		flash_url : "<?=base_url()?>media/flash/swfupload.swf",
		upload_url: "<?=base_url()?>upload/uploadAttachment/eventId/<?php echo $eventId;?>",
		post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
		custom_settings : {
			progressTarget : "fsUploadProgress",
			cancelButtonId : "btnCancel",
			base_url:"<?=base_url()?>",
			uploadedFileInfoDiv:"uploaded_file_info"
		},
		debug: false,
		// Button settings
		button_image_url: "<?=base_url()?>media/images/upload_btn.gif"
	};
	swfu = new SWFUpload($.extend(settings,defaultSetting));
			$(".del_attach").live('click',function(){
				var divObj = $(this);
				$.get('<?php echo base_url()?>upload/delAttachment/aid/'+divObj.attr('aid'),function(data){
					if(data=='success')
					{
						divObj.parent().fadeOut();
					}
				});
			})
</script>